package Composite;

import java.awt.Image;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.ImageIcon;


public class MesAlbums extends Dossier{
    
    private static MesAlbums instance;
    private static BufferedImage vignetteMesAlbums;
    
    private MesAlbums() {
        
        super(RacineLogique.getRacine(), null, "Mes Albums");
               
    }
    
    public static MesAlbums getInstance(){
        
        if(instance==null) instance = new MesAlbums();
        
        return instance;
    }
    
      public ImageIcon getRepresentation() {

        return Element.mesAlbums;
    }
      
                  public Image getVignette() {
        
          if(vignetteMesAlbums!=null) return vignetteMesAlbums;
          try {
            vignetteMesAlbums = ImageIO.read(new File("dossier100mesAlbums.png"));
         } catch (IOException ex) {
            System.out.println("Erreur de lecteur vignette de dossier");
        }          
            return vignetteMesAlbums;
        }
}
